From: Florian Müllner Date: Fri, 13 Aug 2021 01:30:48 +0000 (+0200) Subject: src/shell: Plug some small leaks X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~133 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=506001ebc24543aefa62c4ddaf36802bafae13dc;p=gnome-shell.git src/shell: Plug some small leaks Spotted by coverity in CID 351284 and 351288. Part-of: --- diff --git a/src/shell-global.c b/src/shell-global.c index 49ff2d7dd..e8705f5b0 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -1249,7 +1249,7 @@ shell_global_reexec_self (ShellGlobal *global) char *buf; char *buf_p; char *buf_end; - GError *error = NULL; + g_autoptr (GError) error = NULL; if (!g_file_get_contents ("/proc/self/cmdline", &buf, &len, &error)) { diff --git a/src/shell-perf-log.c b/src/shell-perf-log.c index 95b116905..3bd5228a0 100644 --- a/src/shell-perf-log.c +++ b/src/shell-perf-log.c @@ -862,7 +862,7 @@ replay_to_json (gint64 time, gpointer user_data) { ReplayToJsonClosure *closure = user_data; - char *event_str; + g_autofree char *event_str = NULL; if (closure->error != NULL) return;